<script type="text/javascript" src="<?=Yii::app()->baseUrl?>/js/question.js"></script>
<script type="text/javascript">
function visit(quesid){
	var back_image = document.getElementById("back_image"+quesid);
//	alert(back_image);
	var quesvalue = document.getElementById("input"+quesid);
		if(back_image.className=="not_show_image"){
				back_image.className="show_image";
				quesvalue.value = "yes";
			}else{
				back_image.className="not_show_image";
				quesvalue.value = "no";
			}

}
/*单选效果*/
function visit_only(quesid){
	if(quesid==34){
		var back_image34 = document.getElementById("back_image34");
		var quesvalue34 = document.getElementById("input34");
		var back_image35 = document.getElementById("back_image35");
			if(back_image34.className=="not_show_image"){
					back_image34.className="show_image";
					quesvalue34.value = "diabetes_family_history_single";
					back_image35.className="not_show_image";
				}else{
					back_image34.className="not_show_image";
					quesvalue34.value = "";
				}
		}else{
			var back_image35 = document.getElementById("back_image35");
			var back_image34 = document.getElementById("back_image34");
			var quesvalue34 = document.getElementById("input34");
				if(back_image35.className=="not_show_image"){
					back_image35.className="show_image";
					quesvalue34.value = "diabetes_family_history_double";
					back_image34.className="not_show_image";
				}else{
					back_image35.className="not_show_image";
					quesvalue34.value = "";	
				}

		}
}
/*吸烟*/
 	function visit_smoke(quesid){
 			var back_image61 = document.getElementById("back_image61");
	 		var quesvalue61 = document.getElementById("input61");
	 		var back_image62 = document.getElementById("back_image62");
	 		var quesvalue62 = document.getElementById("input62");
	 		var back_image63 = document.getElementById("back_image63");
	 		var quesvalue63 = document.getElementById("input63");
	 		var back_image64 = document.getElementById("back_image64");
	 		var quesvalue64 = document.getElementById("input64");
	 		var clear_yes = document.getElementById("clear_yes");
	 		var clear_no = document.getElementById("clear_no");
 	 		if(quesid==61){
				if(back_image61.className=="not_show_image"){
					back_image61.className="show_image";
					quesvalue61.value = "yes";
 					clear_yes.style.display="";
 					clear_no.style.display="none";
				}else{
					back_image61.className="not_show_image";
					quesvalue61.value = "no";
 					clear_yes.style.display="none";
 					clear_no.style.display="";
				}
	
 	 	 }else{
 	 		var back_image = document.getElementById("back_image"+quesid);
 	 		var quesvalue = document.getElementById("input"+quesid);
			if(back_image.className=="not_show_image"){
				back_image.className="show_image";
				quesvalue.value = "yes";
			}else{
				back_image.className="not_show_image";
				quesvalue.value = "no";
			}

 	 	}

 	 	}

</script>
    <div class="whole">
        <div class="que-title">
           <?//=$distype?>
        </div>
        <div id="clert">
            <div class="clert-top">
                您的问题还没有回答完！
            </div>
            <div class="clert-content" id="clert_content">
                我知道了！
            </div>
        </div>
        <form id="ent" method="POST" action="<?=$this->createUrl('app/question/getresult',array("uid"=>$uid,"disid"=>$disid,"token"=>$token))?>">
        
        <ul class="que">  
            <?php
                foreach ($ques as $it){
                	switch($it['questype']){
                		case 1:
                			echo "<span class='trick_title'>基本信息</span>";break;
                		case 2:
                			echo "<span class='trick_title'>家病史</span>";break;
                		case 3:
                			echo "<span class='trick_title'>生活习惯</span>";break;
                		case 4:
                			echo "<span class='trick_title'>身体状况</span>";break;
                	}
                	foreach ($it['quesview'] as $item){
                    	echo $item;
                	}
                }
            ?>
        </ul>
        <div id="question_bottom">  
       		 <input type="submit" id="on_button" value="提交">
       	</div>
        </form>
    </div>
</div>
